package jass.iss.edu.Controller;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import jass.iss.edu.Screen.MainScreen;

public class MainController {
	
	//Screen for the MainController
	private MainScreen mainScreen;
	
	private ActionListener al;
	
	public MainController() {
		
		mainScreen = new MainScreen();
		
		mainScreen.addManageAdvertisementListener(this.addJobAdvertisementController());
	}
	
	public ActionListener addJobAdvertisementController(){
			
		this.al = new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent e) {
				
				//JobAdvertisementController
				JobAdvertisementController jobAdvertControl;
				
				System.out.println("Hiding Mainscreen");
				
				mainScreen.app_Frame.setVisible(false);
				
				System.out.println("Starting JobAdvertisementController");
				jobAdvertControl = new JobAdvertisementController();
			}
			
		};
		
		return this.al;
	}

	
	

}
